Integrand size = 29, antiderivative size = 137 \[ \int (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \sec (c+d x) \, dx=\frac {1}{2} \left (6 a^2 A b+A b^3+2 a^3 B+3 a b^2 B\right ) x+\frac {a^3 A \text {arctanh}(\sin (c+d x))}{d}+\frac {b \left (9 a A b+8 a^2 B+2 b^2 B\right ) \sin (c+d x)}{3 d}+\frac {b^2 (3 A b+5 a B) \cos (c+d x) \sin (c+d x)}{6 d}+\frac {b B (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d} \]
[Out]
Time = 0.36 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {3069, 3112, 3102, 2814, 3855} \[ \int (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \sec (c+d x) \, dx=\frac {a^3 A \text {arctanh}(\sin (c+d x))}{d}+\frac {b \left (8 a^2 B+9 a A b+2 b^2 B\right ) \sin (c+d x)}{3 d}+\frac {1}{2} x \left (2 a^3 B+6 a^2 A b+3 a b^2 B+A b^3\right )+\frac {b^2 (5 a B+3 A b) \sin (c+d x) \cos (c+d x)}{6 d}+\frac {b B \sin (c+d x) (a+b \cos (c+d x))^2}{3 d} \]
[In]
[Out]
Rule 2814
Rule 3069
Rule 3102
Rule 3112
Rule 3855
Rubi steps \begin{align*} \text {integral}& = \frac {b B (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d}+\frac {1}{3} \int (a+b \cos (c+d x)) \left (3 a^2 A+\left (6 a A b+3 a^2 B+2 b^2 B\right ) \cos (c+d x)+b (3 A b+5 a B) \cos ^2(c+d x)\right ) \sec (c+d x) \, dx \\ & = \frac {b^2 (3 A b+5 a B) \cos (c+d x) \sin (c+d x)}{6 d}+\frac {b B (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d}+\frac {1}{6} \int \left (6 a^3 A+3 \left (6 a^2 A b+A b^3+2 a^3 B+3 a b^2 B\right ) \cos (c+d x)+2 b \left (9 a A b+8 a^2 B+2 b^2 B\right ) \cos ^2(c+d x)\right ) \sec (c+d x) \, dx \\ & = \frac {b \left (9 a A b+8 a^2 B+2 b^2 B\right ) \sin (c+d x)}{3 d}+\frac {b^2 (3 A b+5 a B) \cos (c+d x) \sin (c+d x)}{6 d}+\frac {b B (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d}+\frac {1}{6} \int \left (6 a^3 A+3 \left (6 a^2 A b+A b^3+2 a^3 B+3 a b^2 B\right ) \cos (c+d x)\right ) \sec (c+d x) \, dx \\ & = \frac {1}{2} \left (6 a^2 A b+A b^3+2 a^3 B+3 a b^2 B\right ) x+\frac {b \left (9 a A b+8 a^2 B+2 b^2 B\right ) \sin (c+d x)}{3 d}+\frac {b^2 (3 A b+5 a B) \cos (c+d x) \sin (c+d x)}{6 d}+\frac {b B (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d}+\left (a^3 A\right ) \int \sec (c+d x) \, dx \\ & = \frac {1}{2} \left (6 a^2 A b+A b^3+2 a^3 B+3 a b^2 B\right ) x+\frac {a^3 A \text {arctanh}(\sin (c+d x))}{d}+\frac {b \left (9 a A b+8 a^2 B+2 b^2 B\right ) \sin (c+d x)}{3 d}+\frac {b^2 (3 A b+5 a B) \cos (c+d x) \sin (c+d x)}{6 d}+\frac {b B (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d} \\ \end{align*}
Time = 1.70 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.16 \[ \int (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \sec (c+d x) \, dx=\frac {6 \left (6 a^2 A b+A b^3+2 a^3 B+3 a b^2 B\right ) (c+d x)-12 a^3 A \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+12 a^3 A \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+9 b \left (4 a A b+4 a^2 B+b^2 B\right ) \sin (c+d x)+3 b^2 (A b+3 a B) \sin (2 (c+d x))+b^3 B \sin (3 (c+d x))}{12 d} \]
[In]
[Out]
Time = 2.92 (sec) , antiderivative size = 135, normalized size of antiderivative = 0.99
method | result | size |
parts | \(\frac {A \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {\left (A \,b^{3}+3 B a \,b^{2}\right ) \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {\left (3 A a \,b^{2}+3 B \,a^{2} b \right ) \sin \left (d x +c \right )}{d}+\frac {\left (3 A \,a^{2} b +B \,a^{3}\right ) \left (d x +c \right )}{d}+\frac {B \,b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}\) | \(135\) |
parallelrisch | \(\frac {-12 A \,a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+12 A \,a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+3 \left (A \,b^{3}+3 B a \,b^{2}\right ) \sin \left (2 d x +2 c \right )+B \sin \left (3 d x +3 c \right ) b^{3}+9 \left (4 A a \,b^{2}+4 B \,a^{2} b +B \,b^{3}\right ) \sin \left (d x +c \right )+36 x \left (A \,a^{2} b +\frac {1}{6} A \,b^{3}+\frac {1}{3} B \,a^{3}+\frac {1}{2} B a \,b^{2}\right ) d}{12 d}\) | \(139\) |
derivativedivides | \(\frac {A \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B \,a^{3} \left (d x +c \right )+3 A \,a^{2} b \left (d x +c \right )+3 B \sin \left (d x +c \right ) a^{2} b +3 A \sin \left (d x +c \right ) a \,b^{2}+3 B a \,b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+A \,b^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+\frac {B \,b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(151\) |
default | \(\frac {A \,a^{3} \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+B \,a^{3} \left (d x +c \right )+3 A \,a^{2} b \left (d x +c \right )+3 B \sin \left (d x +c \right ) a^{2} b +3 A \sin \left (d x +c \right ) a \,b^{2}+3 B a \,b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+A \,b^{3} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+\frac {B \,b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d}\) | \(151\) |
risch | \(3 x A \,a^{2} b +\frac {x A \,b^{3}}{2}+a^{3} B x +\frac {3 x B a \,b^{2}}{2}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} A a \,b^{2}}{2 d}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} B \,a^{2} b}{2 d}-\frac {3 i {\mathrm e}^{i \left (d x +c \right )} B \,b^{3}}{8 d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} A a \,b^{2}}{2 d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} B \,a^{2} b}{2 d}+\frac {3 i {\mathrm e}^{-i \left (d x +c \right )} B \,b^{3}}{8 d}+\frac {A \,a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {A \,a^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}+\frac {\sin \left (3 d x +3 c \right ) B \,b^{3}}{12 d}+\frac {\sin \left (2 d x +2 c \right ) A \,b^{3}}{4 d}+\frac {3 \sin \left (2 d x +2 c \right ) B a \,b^{2}}{4 d}\) | \(247\) |
norman | \(\frac {\left (3 A \,a^{2} b +\frac {1}{2} A \,b^{3}+B \,a^{3}+\frac {3}{2} B a \,b^{2}\right ) x +\left (3 A \,a^{2} b +\frac {1}{2} A \,b^{3}+B \,a^{3}+\frac {3}{2} B a \,b^{2}\right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (12 A \,a^{2} b +2 A \,b^{3}+4 B \,a^{3}+6 B a \,b^{2}\right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (12 A \,a^{2} b +2 A \,b^{3}+4 B \,a^{3}+6 B a \,b^{2}\right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (18 A \,a^{2} b +3 A \,b^{3}+6 B \,a^{3}+9 B a \,b^{2}\right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {b \left (6 A a b -A \,b^{2}+6 B \,a^{2}-3 B a b +2 B \,b^{2}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {b \left (6 A a b +A \,b^{2}+6 B \,a^{2}+3 B a b +2 B \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {b \left (54 A a b -3 A \,b^{2}+54 B \,a^{2}-9 B a b +10 B \,b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}+\frac {b \left (54 A a b +3 A \,b^{2}+54 B \,a^{2}+9 B a b +10 B \,b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4}}+\frac {A \,a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}-\frac {A \,a^{3} \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}\) | \(426\) |
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.96 \[ \int (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \sec (c+d x) \, dx=\frac {3 \, A a^{3} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, A a^{3} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 3 \, {\left (2 \, B a^{3} + 6 \, A a^{2} b + 3 \, B a b^{2} + A b^{3}\right )} d x + {\left (2 \, B b^{3} \cos \left (d x + c\right )^{2} + 18 \, B a^{2} b + 18 \, A a b^{2} + 4 \, B b^{3} + 3 \, {\left (3 \, B a b^{2} + A b^{3}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{6 \, d} \]
[In]
[Out]
\[ \int (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \sec (c+d x) \, dx=\int \left (A + B \cos {\left (c + d x \right )}\right ) \left (a + b \cos {\left (c + d x \right )}\right )^{3} \sec {\left (c + d x \right )}\, dx \]
[In]
[Out]
none
Time = 0.21 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.06 \[ \int (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \sec (c+d x) \, dx=\frac {12 \, {\left (d x + c\right )} B a^{3} + 36 \, {\left (d x + c\right )} A a^{2} b + 9 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a b^{2} + 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A b^{3} - 4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B b^{3} + 12 \, A a^{3} \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 36 \, B a^{2} b \sin \left (d x + c\right ) + 36 \, A a b^{2} \sin \left (d x + c\right )}{12 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 314 vs. \(2 (129) = 258\).
Time = 0.33 (sec) , antiderivative size = 314, normalized size of antiderivative = 2.29 \[ \int (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \sec (c+d x) \, dx=\frac {6 \, A a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 6 \, A a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + 3 \, {\left (2 \, B a^{3} + 6 \, A a^{2} b + 3 \, B a b^{2} + A b^{3}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (18 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 18 \, A a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 9 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, A b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 36 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 36 \, A a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 4 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 18 \, B a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 18 \, A a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 9 \, B a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, A b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, B b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \]
[In]
[Out]
Time = 2.04 (sec) , antiderivative size = 1924, normalized size of antiderivative = 14.04 \[ \int (a+b \cos (c+d x))^3 (A+B \cos (c+d x)) \sec (c+d x) \, dx=\text {Too large to display} \]
[In]
[Out]